#ifndef _SCOPED_LOCK
#define _SCOPED_LOCK

template<class T>
class ScopedLock
{
	T& m_lock;
public:
	ScopedLock(T& lock) : m_lock(lock)
	{
		m_lock.Acquire();
	}
	~ScopedLock()
	{
		m_lock.Release();
	}
};

#endif